package com.example.cet4try.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import com.example.cet4try.R;

public class ActivitySetting extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);

        TextView t_username = findViewById(R.id.t_username);
        EditText ed_nickname = findViewById(R.id.ed_nickname);

        SharedPreferences preferences = getSharedPreferences("App_Shared_Data", 0);
        String username = preferences.getString("username","");
        String nickname = preferences.getString("nickname","");

        t_username.setText(username);
        ed_nickname.setText(nickname);

        findViewById(R.id.bt_zx).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(ActivitySetting.this,"无法注销账号",Toast.LENGTH_SHORT).show();
            }
        });

    }
}
